﻿using System;
using System.Diagnostics;

namespace Bing
{
    /// <summary>
    /// Contains properties pertaining to a result returned for a request that includes the MobileWeb <see cref="ApiHelper.SourceType"/>.
    /// </summary>
    [DebuggerDisplay("{Title}, {Url}, LastCrawl: {DateTime}")]
    public class MobileWebResult
    {
        /// <summary>
        /// Gets or sets the Title string for this <see cref="MobileWebRequest"/>..
        /// </summary>
        /// <value>The title string for this <see cref="MobileWebRequest"/>.</value>
        /// <remarks>The Title field contains the text specified in the HTML TITLE tag of the page.</remarks>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the description text of the result.
        /// </summary>
        /// <value>The description text of the result.</value>
        /// <remarks>This string contains a portion of the text from the body of the HTML page that contains the specified search terms.</remarks>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets Returns the full URL for the result as a string.
        /// </summary>
        /// <value>Returns the full URL for the result as a string.</value>
        /// <remarks>
        /// The Url field contains the full URL to the page. This may contain extended information, such as instrumentation, and may be different than the <see cref="DisplayUrl"/> that you will want to display to the user. Typically, the Title is used to display the text of a hyperlink and the Url is used to specify the link target.<br />
        /// This string contains the URL to the Web page.<br/>
        /// </remarks>
        public string Url { get; set; }

        // TODO: Documentation Error: http://msdn.microsoft.com/en-us/library/dd560943.aspx, wrong data type

        /// <summary>
        /// Gets or sets the URL string to display to the user.
        /// </summary>
        /// <value>The URL string to display to the user.</value>
        public string DisplayUrl { get; set; }

        // TODO: Documentation Error: http://msdn.microsoft.com/en-us/library/dd560947.aspx, wrong data type
        /// <summary>
        /// Gets or sets a DateTime object containing the year, month, day, hour, minute, and second components of the date and time of the last update or crawl.
        /// </summary>
        /// <value>A DateTime object containing the year, month, day, hour, minute, and second components of the date and time of the last update or crawl.</value>
        public DateTime DateTime { get; set; }


    }
}
